#ifndef DEVICEDELETEBTNDELEGATE_H
#define DEVICEDELETEBTNDELEGATE_H

#include <QStyledItemDelegate>
#include <QPushButton>
#include <QMouseEvent>
#include <QApplication>
#include "MonitoringDeviceTableModel.h"

class DeviceDeleteBtnDelegate : public QStyledItemDelegate
{
    Q_OBJECT
public:
    DeviceDeleteBtnDelegate(QObject *parent = nullptr);
    void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
    bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override;
signals:
    void editButtonClicked(int row);
    void checkDevice(int row) ;
};

#endif // DEVICEDELETEBTNDELEGATE_H
